package com.zengqingfa.examples.mybatisplus.config;

import com.zengqingfa.examples.mybatisplus.interceptor.AuthInterceptor;
import com.zengqingfa.examples.mybatisplus.interceptor.RequestInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @fileName: InterceptorConfig
 * @author: zengqf3
 * @date: 2021-6-30 13:41
 * @description:
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new RequestInterceptor());
        registry.addInterceptor(new AuthInterceptor());
    }

}
